using Google.ProtocolBuffers;
using micromsg.Proto;
using System;
using System.CodeDom.Compiler;
using System.Diagnostics;
using System.IO;
using System.Runtime.CompilerServices;
namespace micromsg
{
	[GeneratedCode("ProtoGen", "2.3.0.277"), DebuggerNonUserCode, CompilerGenerated]
	public sealed class ShakeImgResponse : GeneratedMessageLite<ShakeImgResponse, ShakeImgResponse.Builder>
	{
		[GeneratedCode("ProtoGen", "2.3.0.277"), DebuggerNonUserCode, CompilerGenerated]
		public sealed class Builder : GeneratedBuilderLite<ShakeImgResponse, ShakeImgResponse.Builder>
		{
			private bool resultIsReadOnly;
			private ShakeImgResponse result;
			protected override ShakeImgResponse.Builder ThisBuilder
			{
				get
				{
					return this;
				}
			}
			public override bool IsInitialized
			{
				get
				{
					return this.result.IsInitialized;
				}
			}
			protected override ShakeImgResponse MessageBeingBuilt
			{
				get
				{
					return this.PrepareBuilder();
				}
			}
			public override ShakeImgResponse DefaultInstanceForType
			{
				get
				{
					return ShakeImgResponse.DefaultInstance;
				}
			}
			public BaseResponse BaseResponse
			{
				get
				{
					return this.result.BaseResponse;
				}
				set
				{
					this.SetBaseResponse(value);
				}
			}
			public uint ImgId
			{
				get
				{
					return this.result.ImgId;
				}
				set
				{
					this.SetImgId(value);
				}
			}
			public uint TotalLen
			{
				get
				{
					return this.result.TotalLen;
				}
				set
				{
					this.SetTotalLen(value);
				}
			}
			public uint StartPos
			{
				get
				{
					return this.result.StartPos;
				}
				set
				{
					this.SetStartPos(value);
				}
			}
			public SKBuiltinBuffer_t Buffer
			{
				get
				{
					return this.result.Buffer;
				}
				set
				{
					this.SetBuffer(value);
				}
			}
			public Builder()
			{
				this.result = ShakeImgResponse.DefaultInstance;
				this.resultIsReadOnly = true;
			}
			internal Builder(ShakeImgResponse cloneFrom)
			{
				this.result = cloneFrom;
				this.resultIsReadOnly = true;
			}
			private ShakeImgResponse PrepareBuilder()
			{
				if (this.resultIsReadOnly)
				{
					ShakeImgResponse other = this.result;
					this.result = new ShakeImgResponse();
					this.resultIsReadOnly = false;
					this.MergeFrom(other);
				}
				return this.result;
			}
			public override ShakeImgResponse.Builder Clear()
			{
				this.result = ShakeImgResponse.DefaultInstance;
				this.resultIsReadOnly = true;
				return this;
			}
			public override ShakeImgResponse.Builder Clone()
			{
				if (this.resultIsReadOnly)
				{
					return new ShakeImgResponse.Builder(this.result);
				}
				return new ShakeImgResponse.Builder().MergeFrom(this.result);
			}
			public override ShakeImgResponse BuildPartial()
			{
				if (this.resultIsReadOnly)
				{
					return this.result;
				}
				this.resultIsReadOnly = true;
				return this.result.MakeReadOnly();
			}
			public override ShakeImgResponse.Builder MergeFrom(IMessageLite other)
			{
				if (other is ShakeImgResponse)
				{
					return this.MergeFrom((ShakeImgResponse)other);
				}
				base.MergeFrom(other);
				return this;
			}
			public override ShakeImgResponse.Builder MergeFrom(ShakeImgResponse other)
			{
				return this;
			}
			public override ShakeImgResponse.Builder MergeFrom(ICodedInputStream input)
			{
				return this.MergeFrom(input, ExtensionRegistry.Empty);
			}
			public override ShakeImgResponse.Builder MergeFrom(ICodedInputStream input, ExtensionRegistry extensionRegistry)
			{
				this.PrepareBuilder();
				uint num;
				string text;
				while (input.ReadTag(out num, out text))
				{
					if (num == 0u && text != null)
					{
						int num2 = Array.BinarySearch<string>(ShakeImgResponse._shakeImgResponseFieldNames, text, StringComparer.get_Ordinal());
						if (num2 < 0)
						{
							this.ParseUnknownField(input, extensionRegistry, num, text);
							continue;
						}
						num = ShakeImgResponse._shakeImgResponseFieldTags[num2];
					}
					uint num3 = num;
					if (num3 <= 16u)
					{
						if (num3 == 0u)
						{
							throw InvalidProtocolBufferException.InvalidTag();
						}
						if (num3 == 10u)
						{
							BaseResponse.Builder builder = BaseResponse.CreateBuilder();
							if (this.result.hasBaseResponse)
							{
								builder.MergeFrom(this.BaseResponse);
							}
							input.ReadMessage(builder, extensionRegistry);
							this.BaseResponse = builder.BuildPartial();
							continue;
						}
						if (num3 == 16u)
						{
							this.result.hasImgId = input.ReadUInt32(ref this.result.imgId_);
							continue;
						}
					}
					else
					{
						if (num3 == 24u)
						{
							this.result.hasTotalLen = input.ReadUInt32(ref this.result.totalLen_);
							continue;
						}
						if (num3 == 32u)
						{
							this.result.hasStartPos = input.ReadUInt32(ref this.result.startPos_);
							continue;
						}
						if (num3 == 42u)
						{
							SKBuiltinBuffer_t.Builder builder2 = SKBuiltinBuffer_t.CreateBuilder();
							if (this.result.hasBuffer)
							{
								builder2.MergeFrom(this.Buffer);
							}
							input.ReadMessage(builder2, extensionRegistry);
							this.Buffer = builder2.BuildPartial();
							continue;
						}
					}
					if (WireFormat.IsEndGroupTag(num))
					{
						return this;
					}
					this.ParseUnknownField(input, extensionRegistry, num, text);
				}
				return this;
			}
			public ShakeImgResponse.Builder SetBaseResponse(BaseResponse value)
			{
				ThrowHelper.ThrowIfNull(value, "value");
				this.PrepareBuilder();
				this.result.hasBaseResponse = true;
				this.result.baseResponse_ = value;
				return this;
			}
			public ShakeImgResponse.Builder SetBaseResponse(BaseResponse.Builder builderForValue)
			{
				ThrowHelper.ThrowIfNull(builderForValue, "builderForValue");
				this.PrepareBuilder();
				this.result.hasBaseResponse = true;
				this.result.baseResponse_ = builderForValue.Build();
				return this;
			}
			public ShakeImgResponse.Builder MergeBaseResponse(BaseResponse value)
			{
				ThrowHelper.ThrowIfNull(value, "value");
				this.PrepareBuilder();
				if (this.result.hasBaseResponse && this.result.baseResponse_ != BaseResponse.DefaultInstance)
				{
					this.result.baseResponse_ = BaseResponse.CreateBuilder(this.result.baseResponse_).MergeFrom(value).BuildPartial();
				}
				else
				{
					this.result.baseResponse_ = value;
				}
				this.result.hasBaseResponse = true;
				return this;
			}
			public ShakeImgResponse.Builder ClearBaseResponse()
			{
				this.PrepareBuilder();
				this.result.hasBaseResponse = false;
				this.result.baseResponse_ = null;
				return this;
			}
			public ShakeImgResponse.Builder SetImgId(uint value)
			{
				this.PrepareBuilder();
				this.result.hasImgId = true;
				this.result.imgId_ = value;
				return this;
			}
			public ShakeImgResponse.Builder ClearImgId()
			{
				this.PrepareBuilder();
				this.result.hasImgId = false;
				this.result.imgId_ = 0u;
				return this;
			}
			public ShakeImgResponse.Builder SetTotalLen(uint value)
			{
				this.PrepareBuilder();
				this.result.hasTotalLen = true;
				this.result.totalLen_ = value;
				return this;
			}
			public ShakeImgResponse.Builder ClearTotalLen()
			{
				this.PrepareBuilder();
				this.result.hasTotalLen = false;
				this.result.totalLen_ = 0u;
				return this;
			}
			public ShakeImgResponse.Builder SetStartPos(uint value)
			{
				this.PrepareBuilder();
				this.result.hasStartPos = true;
				this.result.startPos_ = value;
				return this;
			}
			public ShakeImgResponse.Builder ClearStartPos()
			{
				this.PrepareBuilder();
				this.result.hasStartPos = false;
				this.result.startPos_ = 0u;
				return this;
			}
			public ShakeImgResponse.Builder SetBuffer(SKBuiltinBuffer_t value)
			{
				ThrowHelper.ThrowIfNull(value, "value");
				this.PrepareBuilder();
				this.result.hasBuffer = true;
				this.result.buffer_ = value;
				return this;
			}
			public ShakeImgResponse.Builder SetBuffer(SKBuiltinBuffer_t.Builder builderForValue)
			{
				ThrowHelper.ThrowIfNull(builderForValue, "builderForValue");
				this.PrepareBuilder();
				this.result.hasBuffer = true;
				this.result.buffer_ = builderForValue.Build();
				return this;
			}
			public ShakeImgResponse.Builder MergeBuffer(SKBuiltinBuffer_t value)
			{
				ThrowHelper.ThrowIfNull(value, "value");
				this.PrepareBuilder();
				if (this.result.hasBuffer && this.result.buffer_ != SKBuiltinBuffer_t.DefaultInstance)
				{
					this.result.buffer_ = SKBuiltinBuffer_t.CreateBuilder(this.result.buffer_).MergeFrom(value).BuildPartial();
				}
				else
				{
					this.result.buffer_ = value;
				}
				this.result.hasBuffer = true;
				return this;
			}
			public ShakeImgResponse.Builder ClearBuffer()
			{
				this.PrepareBuilder();
				this.result.hasBuffer = false;
				this.result.buffer_ = null;
				return this;
			}
		}
		public const int BaseResponseFieldNumber = 1;
		public const int ImgIdFieldNumber = 2;
		public const int TotalLenFieldNumber = 3;
		public const int StartPosFieldNumber = 4;
		public const int BufferFieldNumber = 5;
		private static readonly ShakeImgResponse defaultInstance;
		private static readonly string[] _shakeImgResponseFieldNames;
		private static readonly uint[] _shakeImgResponseFieldTags;
		private bool hasBaseResponse;
		private BaseResponse baseResponse_;
		private bool hasImgId;
		private uint imgId_;
		private bool hasTotalLen;
		private uint totalLen_;
		private bool hasStartPos;
		private uint startPos_;
		private bool hasBuffer;
		private SKBuiltinBuffer_t buffer_;
		private int memoizedSerializedSize = -1;
		public static ShakeImgResponse DefaultInstance
		{
			get
			{
				return ShakeImgResponse.defaultInstance;
			}
		}
		public override ShakeImgResponse DefaultInstanceForType
		{
			get
			{
				return ShakeImgResponse.DefaultInstance;
			}
		}
		protected override ShakeImgResponse ThisMessage
		{
			get
			{
				return this;
			}
		}
		public BaseResponse BaseResponse
		{
			get
			{
				return this.baseResponse_ ?? BaseResponse.DefaultInstance;
			}
		}
		public uint ImgId
		{
			get
			{
				return this.imgId_;
			}
		}
		public uint TotalLen
		{
			get
			{
				return this.totalLen_;
			}
		}
		public uint StartPos
		{
			get
			{
				return this.startPos_;
			}
		}
		public SKBuiltinBuffer_t Buffer
		{
			get
			{
				return this.buffer_ ?? SKBuiltinBuffer_t.DefaultInstance;
			}
		}
		public override bool IsInitialized
		{
			get
			{
				return this.hasBaseResponse && this.hasImgId && this.hasTotalLen && this.hasStartPos && this.hasBuffer && this.BaseResponse.IsInitialized && this.Buffer.IsInitialized;
			}
		}
		public override int SerializedSize
		{
			get
			{
				int num = this.memoizedSerializedSize;
				if (num != -1)
				{
					return num;
				}
				num = 0;
				if (this.hasBaseResponse)
				{
					num += CodedOutputStream.ComputeMessageSize(1, this.BaseResponse);
				}
				if (this.hasImgId)
				{
					num += CodedOutputStream.ComputeUInt32Size(2, this.ImgId);
				}
				if (this.hasTotalLen)
				{
					num += CodedOutputStream.ComputeUInt32Size(3, this.TotalLen);
				}
				if (this.hasStartPos)
				{
					num += CodedOutputStream.ComputeUInt32Size(4, this.StartPos);
				}
				if (this.hasBuffer)
				{
					num += CodedOutputStream.ComputeMessageSize(5, this.Buffer);
				}
				this.memoizedSerializedSize = num;
				return num;
			}
		}
		private ShakeImgResponse()
		{
		}
		public override void WriteTo(ICodedOutputStream output)
		{
			int arg_06_0 = this.SerializedSize;
			string[] shakeImgResponseFieldNames = ShakeImgResponse._shakeImgResponseFieldNames;
			if (this.hasBaseResponse)
			{
				output.WriteMessage(1, shakeImgResponseFieldNames[0], this.BaseResponse);
			}
			if (this.hasImgId)
			{
				output.WriteUInt32(2, shakeImgResponseFieldNames[2], this.ImgId);
			}
			if (this.hasTotalLen)
			{
				output.WriteUInt32(3, shakeImgResponseFieldNames[4], this.TotalLen);
			}
			if (this.hasStartPos)
			{
				output.WriteUInt32(4, shakeImgResponseFieldNames[3], this.StartPos);
			}
			if (this.hasBuffer)
			{
				output.WriteMessage(5, shakeImgResponseFieldNames[1], this.Buffer);
			}
		}
		public override int GetHashCode()
		{
			int num = base.GetType().GetHashCode();
			if (this.hasBaseResponse)
			{
				num ^= this.baseResponse_.GetHashCode();
			}
			if (this.hasImgId)
			{
				num ^= this.imgId_.GetHashCode();
			}
			if (this.hasTotalLen)
			{
				num ^= this.totalLen_.GetHashCode();
			}
			if (this.hasStartPos)
			{
				num ^= this.startPos_.GetHashCode();
			}
			if (this.hasBuffer)
			{
				num ^= this.buffer_.GetHashCode();
			}
			return num;
		}
		public override bool Equals(object value)
		{
			ShakeImgResponse shakeImgResponse = value as ShakeImgResponse;
			return shakeImgResponse != null && (this.hasBaseResponse == shakeImgResponse.hasBaseResponse && (!this.hasBaseResponse || this.baseResponse_.Equals(shakeImgResponse.baseResponse_))) && (this.hasImgId == shakeImgResponse.hasImgId && (!this.hasImgId || this.imgId_.Equals(shakeImgResponse.imgId_))) && (this.hasTotalLen == shakeImgResponse.hasTotalLen && (!this.hasTotalLen || this.totalLen_.Equals(shakeImgResponse.totalLen_))) && (this.hasStartPos == shakeImgResponse.hasStartPos && (!this.hasStartPos || this.startPos_.Equals(shakeImgResponse.startPos_))) && (this.hasBuffer == shakeImgResponse.hasBuffer && (!this.hasBuffer || this.buffer_.Equals(shakeImgResponse.buffer_)));
		}
		public override void PrintTo(TextWriter writer)
		{
			GeneratedMessageLite<ShakeImgResponse, ShakeImgResponse.Builder>.PrintField("BaseResponse", this.hasBaseResponse, this.baseResponse_, writer);
			GeneratedMessageLite<ShakeImgResponse, ShakeImgResponse.Builder>.PrintField("ImgId", this.hasImgId, this.imgId_, writer);
			GeneratedMessageLite<ShakeImgResponse, ShakeImgResponse.Builder>.PrintField("TotalLen", this.hasTotalLen, this.totalLen_, writer);
			GeneratedMessageLite<ShakeImgResponse, ShakeImgResponse.Builder>.PrintField("StartPos", this.hasStartPos, this.startPos_, writer);
			GeneratedMessageLite<ShakeImgResponse, ShakeImgResponse.Builder>.PrintField("Buffer", this.hasBuffer, this.buffer_, writer);
		}
		public static ShakeImgResponse ParseFrom(byte[] data)
		{
			return ShakeImgResponse.CreateBuilder().MergeFrom(data).BuildParsed();
		}
		private ShakeImgResponse MakeReadOnly()
		{
			return this;
		}
		public static ShakeImgResponse.Builder CreateBuilder()
		{
			return new ShakeImgResponse.Builder();
		}
		public override ShakeImgResponse.Builder ToBuilder()
		{
			return ShakeImgResponse.CreateBuilder(this);
		}
		public override ShakeImgResponse.Builder CreateBuilderForType()
		{
			return new ShakeImgResponse.Builder();
		}
		public static ShakeImgResponse.Builder CreateBuilder(ShakeImgResponse prototype)
		{
			return new ShakeImgResponse.Builder(prototype);
		}
		static ShakeImgResponse()
		{
			ShakeImgResponse.defaultInstance = new ShakeImgResponse().MakeReadOnly();
			ShakeImgResponse._shakeImgResponseFieldNames = new string[]
			{
				"BaseResponse",
				"Buffer",
				"ImgId",
				"StartPos",
				"TotalLen"
			};
			ShakeImgResponse._shakeImgResponseFieldTags = new uint[]
			{
				10u,
				42u,
				16u,
				32u,
				24u
			};
			object.ReferenceEquals(micromsg.Proto.ShakeImgResponse.Descriptor, null);
		}
	}
}
